#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName   : cp2_2.7_1.py
# @Time       : 2023/6/13 19:01
# @Author     : ash
# @Description: 元组拆包的几种不同写法
import os

if __name__ == "__main__":
    lax_coordinates = (33.9425, -118.408056)
    latitude, longitude = lax_coordinates
    print(latitude, longitude)

    divmod(20, 8)
    t = (20, 8)
    divmod(*t)
    quotient, remainder = divmod(*t)
    print(quotient, remainder)

    _, filename = os.path.split('/home/luciano/.ssh/idrsa.pub')
    print(filename)

    a, b, *rest = range(5)
    print(a, b, rest)
    a, b, *rest = range(3)
    print(a, b, rest)
    a, b, *rest = range(2)
    print(a, b, rest)
    a, *body, c, d = range(5)
    print(a, body, c, d)
    *head, b, c, d = range(5)
    print(head, b, c, d)
